package com.dc.business.datacollectbusiness.mapper;

import com.dc.business.datacollectbusiness.model.HSminiProgramData;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface HSminiProgramMapper {
    @Select({
            "SELECT * FROM tbeng_push_custom_data",
            "WHERE upload_time BETWEEN #{startDate} AND #{endDate}",
            "AND tf_collecter_product_code = #{collegeAndPoint}",
            "AND channelno = #{channelno}",
            "ORDER BY upload_time DESC"
    })
    @Results({
            @Result(property = "id", column = "id"),
            @Result(property = "uploadTime", column = "upload_time"),
            @Result(property = "tfSensorProductCode", column = "tf_sensor_product_code"),
            @Result(property = "tfBat", column = "tf_bat"),
            @Result(property = "tfCsq", column = "tf_csq"),
            @Result(property = "pv", column = "pv"),
            @Result(property = "tfCollecterProductCode", column = "tf_collecter_product_code"),
            @Result(property = "channelno", column = "channelno"),
            @Result(property = "status", column = "status"),
            @Result(property = "pvVer", column = "pv_ver")
    })
    List<HSminiProgramData> dataSelect(@Param("startDate") String startDate,
                                       @Param("endDate") String endDate,
                                       @Param("collegeAndPoint") String collegeAndPoint,
                                       @Param("channelno") String channelno);

}
